import request from '@/utils/request'

class DepartmentApi {
  query(data) {
    return request({
      url: '/department/list',
      method: 'get',
      data
    })
  }

  queryByCond(data, pageSize, pageNum) {
    return request({
      url: `/department/queryByCond?pageSize=${100}&pageNum=${1}`,
      method: 'post',
      data
    })
  }
  queryTree(data) {
    return request({
      url: `/department/tree`,
      method: 'get',
      data
    })
  }
  ///tree
  add(data) {
    return request({
      url: '/department/add',
      method: 'post',
      data
    })
  }
  importExcelData(data) {
    return request({
      url: '/department/importExcelData',
      method: 'post',
      data
    })
  }
  update(data) {
    return request({
      url: '/department/update',
      method: 'post',
      data
    })
  }
  delete(data) {
    return request({
      url: '/department/delete',
      method: 'post',
      data
    })
  }
}

export default new DepartmentApi()
